#ifndef FLIGHTMANAGER_H
#define FLIGHTMANAGER_H
#include <iostream>
#include <vector>
#include "FLIGHTINFO.h"
using namespace std;

class FlightManager
{
	private:
		vector<Flightinfo> flights;
		
	public:
		addFlight(Flightinfo flight)
		{
			flights.push_back(flight);
		}
		
		editFlight(int index, Flightinfo newFlight)
		{
			while(index < 0 || index >= flights.size())
			{
				cout << "输入新航班序号错误，请重新输入" << endl;
				cin >> index;
			}
				flights[index] = newFlight;
		}
		
		deletFlight(int index)
		{
			while(index < 0 || index >= flights.size())
			{
				cout << "输入航班序号错误，请重新输入" << endl;
				cin >> index;
			}
				flights.erase(flights.begin() + index);
		}
};
#endif

